package com.xiangge.domain;
/*
    这是一个学生类
 */
public class User {
    // 私有属性
    private String name;
    private int age;

    // 构造方法
    public User() {
    }
    public User(String name, int age) {
        this.name = name;
        this.age = age;
    }

    // setter and getter

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    // 行为
    public void show() {
        System.out.println(this.name + ":" + this.getAge());
    }
}
